/**
 * jims
 */
package com.jims.master.modules.drug.entity;

import com.jims.master.common.persistence.DataEntity;
import org.hibernate.validator.constraints.Length;

/**
 * 药品名称字典Entity
 * @author 朱齐
 * @version 2017-03-01
 */
public class DrugNameDict extends DataEntity<DrugNameDict> {

	private static final long serialVersionUID = 1L;
	private String drugCode;		// 药品代码
	private String drugName;		// 药品名称
	private String inputCode;		// 输入码
	private String drugType;        //类别
	private String drugFrom;        //剂型
	private String drugIndicator;   //药品类型：中药、西药、中成药
	private DrugClassDict drugClassDict; //药品类型

	public DrugClassDict getDrugClassDict() {
		return drugClassDict;
	}

	public void setDrugClassDict(DrugClassDict drugClassDict) {
		this.drugClassDict = drugClassDict;
	}

	public DrugNameDict() {
		super();
	}

	public DrugNameDict(String id){
		super(id);
	}

	@Length(min=1, max=20, message="药品代码长度必须介于 1 和 20 之间")
	public String getDrugCode() {
		return drugCode;
	}

	public void setDrugCode(String drugCode) {
		this.drugCode = drugCode;
	}

	@Length(min=1, max=100, message="药品名称长度必须介于 1 和 100 之间")
	public String getDrugName() {
		return drugName;
	}

	public void setDrugName(String drugName) {
		this.drugName = drugName;
	}

	@Length(min=0, max=50, message="输入码长度必须介于 0 和 50 之间")
	public String getInputCode() {
		return inputCode;
	}

	public void setInputCode(String inputCode) {
		this.inputCode = inputCode;
	}

	public String getDrugType() {
		return drugType;
	}

	public void setDrugType(String drugType) {
		this.drugType = drugType;
	}

	@Length(min=1, max=2, message="剂型长度必须介于 1 和 2 之间")
	public String getDrugFrom() {
		return drugFrom;
	}

	public void setDrugFrom(String drugFrom) {
		this.drugFrom = drugFrom;
	}

	@Length(min=1, max=2, message="药品类别标志[1西药，2中草药，3中成药，5辅料，6耗材，8材料，9其他]长度必须介于 1 和 2 之间")
	public String getDrugIndicator() {
		return drugIndicator;
	}

	public void setDrugIndicator(String drugIndicator) {
		this.drugIndicator = drugIndicator;
	}
}